package com.ruoyi.common.enums;

/**
 * 发送短信类型枚举
 * @author zhimin.hu
 * @Date 2021/2/26
 */
public enum SendMsgType {

    OK(0, "登陆"), DISABLE(1, "注册"), DELETED(2, "验证");

    private final int code;
    private final String info;

    SendMsgType(int code, String info)
    {
        this.code = code;
        this.info = info;
    }
    public static SendMsgType getSendMsgTypeByCode(int code) {
        for (SendMsgType c : SendMsgType.values()) {
            if (c.getCode() == code) {
                return c;
            }
        }
        return null;
    }
    public int getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }
}
